package edu.cuc.akkaDay01.demo01;

import akka.actor.ActorRef;
import akka.actor.UntypedActor;

/**
 * Created by bingruiqi on 2017/9/9.
 */
public class Greeter extends UntypedActor {
    public static enum Msg{
        GREET,Done;
    }
    @Override
    public void onReceive(Object o) throws Exception {
        if (o==(Msg.GREET)) {
            System.out.println("Hello world");
            getSender().tell(Msg.Done, getSelf());

        } else {
            unhandled(o);
        }
    }
}
